Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove zod schemas from app info JSON format #3458

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

amcaplan
Copy link
Contributor

WHY are these changes introduced?

It's not valuable to the user, and it's 80% of output lines.

On a sample local app, we went from 2717 lines of JSON to 562.

WHAT is this pull request doing?

Removes the Zod schemas from app info when you run --json

How to test your changes?

Compare npm run info --json with and without this change.

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

This comment has been minimized.

Copy link
Contributor

@gonzaloriestra gonzaloriestra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better now! But why do we even want to return the specifications? Why showing so much more data when choosing the JSON format? 🤔

Also, don't we have tests for the JSON output?

@amcaplan
Copy link
Contributor Author

Info isn't really a critical path, so as long as it basically works and the feature specs pass, we're OK. The main thing is the JSON is an accurate representation of the loaded app for debugging purposes.

It's fair to ask whether we need the specifications at all, I'm not sure offhand. @isaacroldan thoughts?

@isaacroldan
Copy link
Contributor

We don't need to output any info about the specifications, we can remove that :)

@amcaplan amcaplan force-pushed the remove-zod-schemas-from-app-json-info branch from b4ea593 to 5fd1946 Compare March 3, 2024 10:23
@amcaplan amcaplan force-pushed the remove-zod-schemas-from-app-json-info branch from 5fd1946 to 3e4e398 Compare March 3, 2024 18:50
Copy link
Contributor

github-actions bot commented Mar 3, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
73.55% (+0.01% 🔼)
6594/8965
🟡 Branches
70.27% (-0.05% 🔻)
3193/4544
🟡 Functions
72.83% (+0.01% 🔼)
1748/2400
🟡 Lines
74.54% (+0.01% 🔼)
6220/8345
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / info.ts
91.38% (-0.7% 🔻)
73.08% (-3.01% 🔻)
93.75% (-2.55% 🔻)
93.46% (-1.17% 🔻)
🟢
... / ConcurrentOutput.tsx
97.62% (-2.38% 🔻)
75% (-8.33% 🔻)
100%
97.44% (-2.56% 🔻)

Test suite run success

1569 tests passing in 736 suites.

Report generated by 🧪jest coverage report action from 3e4e398

@amcaplan amcaplan added this pull request to the merge queue Mar 4, 2024
Merged via the queue into main with commit 9a9ea10 Mar 4, 2024
@amcaplan amcaplan deleted the remove-zod-schemas-from-app-json-info branch March 4, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants